package cn.linjianhui.flink.sample.model;

import java.math.BigDecimal;

public class WareAccumulator {
    private String virtualCategory;
    private BigDecimal salesAmount;
    private Long qty;

    public WareAccumulator() {
        qty = 0L;
        salesAmount = BigDecimal.ZERO;
    }

    public WareAccumulator(String virtualCategory, BigDecimal salesAmount, Long qty) {
        this.virtualCategory = virtualCategory;
        this.salesAmount = salesAmount;
        this.qty = qty;
    }

    public String getVirtualCategory() {
        return virtualCategory;
    }

    public void setVirtualCategory(String virtualCategory) {
        this.virtualCategory = virtualCategory;
    }

    public BigDecimal getSalesAmount() {
        return salesAmount;
    }

    public void setSalesAmount(BigDecimal salesAmount) {
        this.salesAmount = salesAmount;
    }

    public Long getQty() {
        return qty;
    }

    public void setQty(Long qty) {
        this.qty = qty;
    }

    public void addQty(long qty) {
        this.qty += qty;
    }

    public void addSalesAmount(BigDecimal amount) {
        this.salesAmount = this.salesAmount.add(amount);
    }
}
